using System.Threading;
using Cysharp.Threading.Tasks;
using GameFramework.Request;

namespace GameFramework.Rpc
{
    /// <summary>
    /// RPC等待器接口
    /// </summary>
    public interface IRpcWaiter
    {
        /// <summary>
        /// RpcId
        /// </summary>
        uint RpcId { get; }
        
        /// <summary>
        /// 异步等待响应
        /// </summary>
        UniTask<IResponse> GetResponseAsync(CancellationToken token);
    }
}